package com.mashibing.jvm.intern;

public class Test {
    public static void main(String[] args) {
        String s1 = new String("yzt");
        String s2 = s1.intern();
        String s3 = "yzt";
        System.out.println(s1 == s2); //false
        System.out.println(s1 == s3); //false
        System.out.println(s2 == s3); //true

    }
}
